package com.huarui.inventory.dao;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.IBaseDao;

import com.huarui.inventory.model.Inventory;
import com.huarui.inventory.model.InventoryListModel;
import com.huarui.quotation.model.QuotationListModel;

public interface IInventoryDao extends IBaseDao {

	public List<Map<String,Object>> queryInventoryByCondition(
			InventoryListModel inventoryListModel);

	public List<Inventory> queryInventoryByCondition(
			QuotationListModel quotationListModel);

	public int countByConditions(InventoryListModel inventoryListModel);

	// public int countsByCondition(QuotationListModel quotationListModel);

	@SuppressWarnings("unchecked")
	public List<Inventory> getInventoryByConditions(Map map);

	public void batchUpdateInventory(List<Inventory> inventories);

	public void batchUpdateInventoryList(List<Inventory> inventoryList);

	public List<Map<String, Object>> queryForListBySize(
			Map<String, Object> map, int size);

	public void batchInsertInventory(List<Inventory> inventories);

	/**
	 * 根据id 和companyId 查询
	 * 
	 * @param id
	 * @param companyId
	 * @return
	 */
	public Inventory getInventoryByIdAndCompanyId(Integer id, Integer companyId,boolean update);
	
	public Integer showInventoryToSaleCount(Map<String, Object> paramsMap);
	
	public List<Map<String, Object>> showInventoryToSale(Map<String, Object> paramsMap);
	/**
	 * 根据条件查询库存总数
	 * @param quotaMap
	 * @author yijiwei
	 * @return
	 */
	public Integer getInventoryCountByCondition(Map<String, Object> quotaMap);
	/**
	 * 根据条件查询库存
	 * @param quotaMap
	 * @author yijiwei
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public List<Map> getInventoryForMapByCondition(Map<String, Object> quotaMap);
	
	
	public Integer getCountByCondition(Map<String, Object> map);
	public List<Inventory> getListByCondition(Map<String, Object> map);

	
	public Integer getCountByConditions(Map<String, Object> queryMap);


	public List<Map<String, Object>> getMapByConditions(Map<String, Object> queryMap);

}
